package com.yyl.rbacs.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @BelongsProject: rbacs
 * @BelongsPackage: com.yyl.rbacs.controller
 * @Author: YuanSir
 * @CreateTime: 2022-10-28  10:48
 * @Description: 模板页面Controller，用于返回模板页面
 * @Version: 1.0
 */

@Controller
public class TemplateController {
    
    @RequestMapping({"/", "/index.html"})
    public String index(){
        return "index";
    }
    
    @RequestMapping("/login.html")
    public String login(){
        return "login";
    }
    
    @RequestMapping("/main.html")
    public String main(){
        return "main";
    }
    
    @RequestMapping("/404.html")
    public String notFound(){
        return "404";
    }
    
    @RequestMapping("/modules/{module}/{url}.html")
    public String module(@PathVariable("module") String module, @PathVariable("url") String url){
        return "modules/" + module + "/" + url;
    }

}
